require(['jquery', 'cookie', 'app', "lay"], function ($) {
    require(['vue', "orgchart", 'cans'], function (Vue) {
        var dic = new Vue({
            el: ".vue-box"
            , data: {
                zName: ""
            }
            , created: function () {
                var datascource = playGet("/v2/api/tj/tu/" + new acquire().parameterMap["userId"]).data;
                setTimeout(function () {
                    'use strict';
                    (function ($) {
                        $(function () {
                            $('#chart-container').orgchart({
                                'data': datascource,
                                'depth': 2,
                                'nodeTitle': 'name',
                                'nodeContent': 'title'
                            });
                        });
                    })($);
                }, 100);
            }
            , methods: {
                seachs: function () {
                    var datascource = playGet("/v1/api/setting/tj/tu/" + dic.zName).data;
                    setTimeout(function () {
                        'use strict';
                        (function ($) {
                            $(function () {
                                $('#chart-container').orgchart({
                                    'data': datascource,
                                    'depth': 2,
                                    'nodeTitle': 'name',
                                    'nodeContent': 'title'
                                });
                            });
                        })($);
                    }, 100);
                }
            }
        });
    })
});